## VAA effects meta-analysis ----------------------
## packages ---------------------------------------

# install packages from CRAN
p_needed <- c("tidyverse",
              "magrittr",
              "janitor", "broom", # clean up stuff
              "readxl", "writexl", "png", #  import/export
              "stargazer", "xtable", "summarytools", "tab", "texreg", # format stuff
              "ggthemes", "hrbrthemes",  "RColorBrewer", "networkD3", "grid", "gridExtra", # plot stuff
              "margins", "AER", "mokken", # stats stuff
              "estimatr", # for IVrobust regression
              "psych", # for PCA
              "lubridate", "reshape2", "gdata", "scales", "labelled", "xts", # work with data
              "metafor" # meta-analysis tools
)
packages <- rownames(installed.packages())
p_to_install <- p_needed[!(p_needed %in% packages)]
if (length(p_to_install) > 0) {
  install.packages(p_to_install)
}
lapply(p_needed, require, character.only = TRUE)

rm(packages, p_to_install, p_needed)

#install.packages("reshape")
#install.packages("coefplot2",repos="http://www.math.mcmaster.ca/bolker/R",type="source")
library(coefplot2)


